package org.csu.mypetstore.common;

import lombok.Getter;

@Getter
public enum ResponseCode {


    SUCCESS(0, "SUCCESS"),
    SAVE_OK(20011, "SAVE_OK"),
    DELETE_OK(20021, "DELETE_OK"),
    UPDATE_OK(20031, "UPDATE_OK"),
    GET_OK(20041, "GET_OK"),
    ERROR(1, "ERROR"),
    SAVE_ERR(20010, "SAVE_ERR"),
    DELETE_ERR(20020, "DELETE_ERR"),
    UPDATE_ERR(20030, "UPDATE_ERR"),
    GET_ERR(20040, "GET_ERR"),
    SYSTEM_ERR(50001, "SYSTEM_ERR"),
    SYSTEM_TIMEOUT_ERR(50002, "SYSTEM_TIMEOUT_ERR"),
    SYSTEM_UNKNOW_ERR(59999, "SYSTEM_UNKNOW_ERR"),
    BUSINESS_ERR(60002, "BUSINESS_ERR");


    private final int code;
    private final String desc;

    ResponseCode(int code, String desc){
        this.code = code;
        this.desc = desc;
    }
}
